import axios from '@/libs/api.request'

export const getPosterList = (pageId) => {
  return axios.request({
    url: 'Poster/getPosterList',
    method: 'post',
    data: {pageId}
  })
}

export const delPoster = (id) => {
  return axios.request({
    url: 'Poster/delPoster',
    data: {id},
    method: 'post'
  })
}

export const editPoster = ({id, title, posterSrc}) => {
  const data = {
    id,
    title,
    posterSrc
  }
  return axios.request({
    url: 'Poster/editPoster',
    data,
    method: 'post'
  })
}

export const getPosterDetail = (id) => {
  return axios.request({
    url: 'Poster/getPosterDetail',
    data: {id},
    method: 'post'
  })
}
